package com.spic.system.domain;

import com.spic.common.core.annotation.Excel;
import com.spic.common.core.web.domain.BaseEntity;

/**
 * 流水号规则配置对象 sys_number_config
 * 
 * @author spic
 * @date 2021-11-02
 */

public class SysNumberConfig extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 流水号名称 */
    @Excel(name = "流水号名称")
    private String codename;

    /** 前缀 */
    @Excel(name = "前缀")
    private String prefix;

    /** 日期中缀 */
    @Excel(name = "日期中缀")
    private String infix;

    /** 起始数值 */
    @Excel(name = "起始数值")
    private Long startnumber;

    /** 步长 */
    @Excel(name = "步长")
    private Integer step;

    /** 位数 */
    @Excel(name = "位数")
    private Integer digit;

    /** 后缀 */
    @Excel(name = "后缀")
    private String suffix;

    /**  循环周期 **/
    private Cycle cycle;

    /** 备注说明 **/
    private String remark;

    public enum Cycle{
        NONE,
        YEAR,
        MONTH,
        DAY;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCodename(String codename)
    {
        this.codename = codename;
    }

    public String getCodename()
    {
        return codename;
    }
    public void setPrefix(String prefix)
    {
        this.prefix = prefix;
    }

    public String getPrefix()
    {
        return prefix;
    }
    public void setInfix(String infix)
    {
        this.infix = infix;
    }

    public String getInfix()
    {
        return infix;
    }
    public void setStartnumber(Long startnumber)
    {
        this.startnumber = startnumber;
    }

    public Long getStartnumber()
    {
        return startnumber;
    }
    public void setStep(Integer step)
    {
        this.step = step;
    }

    public Integer getStep()
    {
        return step;
    }
    public void setDigit(Integer digit)
    {
        this.digit = digit;
    }

    public Integer getDigit()
    {
        return digit;
    }
    public void setSuffix(String suffix)
    {
        this.suffix = suffix;
    }

    public String getSuffix()
    {
        return suffix;
    }

    public Cycle getCycle() {
        return cycle;
    }

    public void setCycle(Cycle cycle) {
        this.cycle = cycle;
    }

    @Override
    public String getRemark() {
        return remark;
    }

    @Override
    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "SysNumberConfig{" +
                "id=" + id +
                ", codename='" + codename + '\'' +
                ", prefix='" + prefix + '\'' +
                ", infix='" + infix + '\'' +
                ", startnumber=" + startnumber +
                ", step=" + step +
                ", digit=" + digit +
                ", suffix='" + suffix + '\'' +
                ", cycle='" + cycle + '\'' +
                '}';
    }
}
